Implement va_copy for VS 2012
authorRobert Lipe <robertlipe@users.noreply.github.com>
Thu, 22 Dec 2016 01:00:37 +0000 (19:00 -0600)
committerGitHub <noreply@github.com>
Thu, 22 Dec 2016 01:00:37 +0000 (19:00 -0600)
va_copy is part of C++ 11, not supported by VS 2012

defs.h

diff --git a/defs.h b/defs.h
index df2df9c51ea62e4372fd95cb5c4d689d31cc54ac..037fee7a09f92ea615ec19a88133e674869b10f6 100644 (file)
--- a/defs.h
+++ b/defs.h
 #  define strdup _strdup
 #endif
 
+/* Workaround for lack of va_copy in Visual Studio 2012 and earlier */
+#if __WIN32__
+#  if _MSC_VER
+#    if _MSC_VER < 1700
+#      define va_copy(dest, src) ((dest) = (src))
+#    endif
+#  endif
+#endif
+
 /* Turn off numeric conversion warning */
 #if __WIN32__
 #  if _MSC_VER